import { ecs } from "../../core/ecs/ECS";
import { HallModel } from "./model/HallModel";
import { HallServerStartComp, HallServerStartSystem } from "./sys/HallServerStart";


@ecs.register(`HallServer`)
export class HallServer extends ecs.Entity {
    HallModel!: HallModel;

    protected init() {
        this.addComponents<ecs.Comp>(
            HallModel);
    }

    /** 开启网关服务器 */
    start() {
        this.add(HallServerStartComp);
    }
}

export class EcsHallSystem extends ecs.System {
    constructor() {
        super();

        this.add(new HallServerStartSystem());
    }
}